﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EIS_desktop
{
    public partial class PayCalendar : Form
    {
        public PayCalendar()
        {
            InitializeComponent();
        }

        private void PayCalendar_Load(object sender, EventArgs e)
        {
            for (int year = 1970; year <= 2030; year++)
            {
                comboBox2.Items.Add(year);
            }
            dataGridView1.Hide();
            dataGridView1.Rows.Add("sheeja", "view/edit payroll");
        }

        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 1)
            {
                PayRoll objpr = new PayRoll(comboBox1.Text,Convert.ToInt32(comboBox2.Text), dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(), 100);
                objpr.Show();
            }
        }

        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            dataGridView1.Show();
        }

    }
}
